The factory method is available since a long time, so this should compile with all supported versions.