Fix GCC 4.6 build errors to support Raspbian Wheezy.