fix linux issues

Level:: only works for enum class (in g++), __stdcall is windows specific.