fixed some compilation errors for SDL 1.2 target