Fix raspberry pi compilation issues as per joyent issue 8062