Tiny JSDeferred implementation