Innovation capability, credit constraint and the cyclicality of R&D investment