Update for linux compile

- Adde -m32 to compile flags, for 32-bit code.
- Changed asm/io.h to sys/io.h
- Changed removed some bad externs that were pointing to statics
- Added some ifdef for win32 opengl specific GL_TEXTURE? handling.