Executing the new accepted method just in Mavericks and Yosemite. For backwards compatibility