Backport from 54b9acb381353df7a3f19e4178e961f31b4b7515 for 10.10 compatibility