minor fixes to mkcompile_h and additional changes for GCC 4.6.2