Joint Localization and Environment Sensing by Harnessing NLOS Components in RIS-aided mmWave Communication Systems