Fix compilation on BlackBerry

This fixes issue #6.