MOB-8523: Adding patches required on top of Barry master 406da05 to allow building under GCC 4.7.