The role of nanopore shape in surface-induced crystallization