Added OS X compatibility.