**Acknowledgements**

The authors express their gratitude to Angelo Luongo for his contribution to dynamics of a pendulum with variable length and fruitful discussions on nonlinear mechanics.
