Generation of electrical self-oscillations in two-terminal switching devices based on the insulator-to-metal phase transition of VO2 thin films