folded-in customizations from @mathiasbynens