A characterization of S-shaped utility functions displaying loss aversion