Finite-size scaling at infinite-order phase transitions