Add portable version for the use with libunwind