The transcorrelated method for accurate correlation energies using gaussian-type functions: examples on He, H2, LiH and H2O