Build fixes for old gcc to remove type-punning warnings