Fix PR14175

Check an allocator for the correct |construct()| method signature before calling it.