Back ported to build against 1.5.2