Copy suffix() function from stdlib for environments with stdlib < 3.0