States scramble to complete renewable energy projects before tax credits expire