factored out isBrowser check into runtime-util