Add browser/Node detection, add minimal declarations