A structural labour supply model with flexible preferences