Fix PR14175

Check an allocator for the correct |construct()| method signature before calling it.
Merge pull request #1 from abyss7/patch-1

Fix PR14175