Fix segfaults seen on boot when compiled with gcc-4.8

....8

These are backports from 3.9, tested boot on beaglebone

Signed-off-by: Khem Raj <raj.khem@gmail.com>