Inclusion of reaction fields in molecular dynamics. Application to liquid water