Compilation fixes for blackberry port.