Make API url function work when permalinks are not pretty

@coenjacobs for .14 too