hacky shims to support new chrome.serial API without re-writing all the code