fixes to make it build under android