A Joint Duty-Cycle and Transmission Power Management for Energy Harvesting WSN