Hydraulic cylinder with pilot operated check valve