fixed build issues on beaglebone, including some compile warnings