Merge "Fix build on OS X Mavericks" into idea133