Naomi Osaka needed three sets to beat Belgium's Yanina Wickmayer in the second round of the Miami Open.