compatibility fixes for 4.8 and 4.9 toolchains.

this will fix compatibility issue with 4.8 and 4.9 toolchains while compiling.