Fix build with both 2.24 and 2.25 version