Share a createUniqueEntity implementation between unix and windows.