Fix to get it working with 5.4 or later versions