Combination of polymeric substrates and metal–polymer nanocomposites for optical humidity sensors