Why not use swimming goggles? Presumably those would reduce the chance of water getting into your eyes :)
Also, after swimming for an hour and taking a break, I like to remove them for a bit. It has happened that I got water in my eye in this way. Never had an infection because of it though!