fixed #1703: fixed compilation errors for BlackBerry.