Fixed errors about offsetof when compiling on Linux.
Fixed compile errors on GCC due including some files the wrong way