Adding compiler options and some headers to compile with GCC 4.7.3