BlackBerry Posts Surprise Profit, But Subscribers Slip