Deriving critical load functions for nitrogen and sulphur using threshold values of a habitat quality metric