Electro-hydraulic variable valve actuator and method to control valves of internal combustion engines