fix(progress): Check if cursorTo function is available before using it