Change for 2.10.x compatibility

This change allows the code to compile with both 2.9 and 2.10.