Fixes to make libpebble run.