[Form] fixed INF usage which does not work on Solaris (closes #8246)