(BlackBerry) Move to Makefile build, fix crashes.