Improved install script, now compatible with OS X