Exploiting polymorphism in second sphere coordination: thermal transformation, NLO properties and selective mechanochemical synthesis