Fixed build errors on blackberry and j2me.