R&D investment and financing constraints of small and medium-sized firms