fix gcc-4.2 errors, warnings, add -D_FILE_OFFSET_BITS=64 and -O3