Compilation error fixes for Blackberry and Marmalade ports.