Nissan joins Tesla in selling green-car credits to boost revenue