Update Travis-CI script to support nan