Compilation fixes for blackberry port.
Merge pull request #6096 from dumganhar/master

Compilation fixes for blackberry port.