tweak to compile options and enum converstion to support g++ 4.4