Then I would take a share in the startup's revenue (not equity - say 20% of gross income) until the other half of my hourly rate was made up for - this could take a year or two years etc, or if the startup is very successful it could only take 3 months; but it is capped to the total 50% of the hourly rate * number of hours worked.
I also would take an extra share of revenue, say for the first year, as a potential bonus for taking on the risk of possibly not earning my full developer rate if the startup fails. This extra could be 5% or 10% of the first year or two years' revenue but is not capped and so if the startup is very successful the developer could do quite well, but the founders have not sacrificed any long-term equity in their business.
I thought that was a nice way to give the developer a share of the business' success without actually giving up equity, and also without asking the developer to take a total risk that they could have wasted their time and never receive anything for it.