Some Makefile changes for compiling extension modules

Some tweaks to better support C (as opposed to C++) compilation.
Can now compile extension modules using gcc, in addition to clang as before.