tweaks for gcc 4.2.1 compilation