Maximally-localized Wannier functions for disordered systems: application to amorphous silicon