Consistent model selection in the spiked Wigner model via AIC-type criteria