Fixes for proper compilation with toolchains upto 4.8.3