Netherlands win relay in a photo finish