add large thread stack size support

(cherry-picked from ruboto)