adapted to Coq-8.4pl2