spl: fix stack usage check if gd is not initialized