Use same callback structure for node and browser.