Fix compatibility with OS X prior to 10.9