Add a thin compability layer to avoid API breakage.
Merge remote-tracking branch 'upstream/master'