BlackBerry Posts Profit in Transition Quarter